﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using Convertor.Interface;

namespace Convertor
{
    class ChildPluginsConvertor : IValueConverter
    {
        #region IValueConverter 成员

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            List<IPluginItem> iSelect = value as List<IPluginItem>;
            if (iSelect != null  && iSelect.Count > 0)
            {
                string m = string.Format(@" [{0}] ", iSelect.Count);
                return m;
            }
            else
            {
                return string.Empty;
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
